﻿<Window x:Class="Gaming_club.Windows.Authorization"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:Gaming_club.Windows"
        mc:Ignorable="d"
        Title="Authorization" Height="370" Width="400">
    <Window.Resources>
        <Style TargetType="TextBox" x:Key="PlaceholderTextBoxStyle">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="TextBox">
                        <Grid>
                            <Border Background="{TemplateBinding Background}"
                                    BorderBrush="{TemplateBinding BorderBrush}"
                                    BorderThickness="{TemplateBinding BorderThickness}"/>
                            <TextBlock x:Name="PlaceholderText"
                                       Text="{TemplateBinding Tag}"
                                       Visibility="Collapsed"
                                       Margin="4,0,0,0"
                                       Foreground="Gray"
                                       VerticalAlignment="Center"
                                       FontSize="16"/>
                            <ScrollViewer x:Name="PART_ContentHost" Focusable="false"/>
                        </Grid>
                        <ControlTemplate.Triggers>
                            <MultiTrigger>
                                <MultiTrigger.Conditions>
                                    <Condition Property="Text" Value=""/>
                                    <Condition Property="IsFocused" Value="False"/>
                                </MultiTrigger.Conditions>
                                <Setter TargetName="PlaceholderText" Property="Visibility" Value="Visible"/>
                            </MultiTrigger>
                        </ControlTemplate.Triggers>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>

        <Style x:Key="NoHoverButton" TargetType="Button">
            <Setter Property="Background" Value="#34c6cd"/>
            <Setter Property="Foreground" Value="White"/>
            <Setter Property="FontFamily" Value="Segoe UI Black"/>
            <Setter Property="FontSize" Value="16"/>
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <Border Background="{TemplateBinding Background}"
                                BorderBrush="{TemplateBinding BorderBrush}"
                                BorderThickness="{TemplateBinding BorderThickness}"
                                Padding="{TemplateBinding Padding}">
                            <ContentPresenter HorizontalAlignment="Center"
                                              VerticalAlignment="Center"/>
                        </Border>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="Background" Value="#34c6cd"/>
                </Trigger>
            </Style.Triggers>
        </Style>
    </Window.Resources>
    <Grid>
        <Image Source="/image/Логотип.png" HorizontalAlignment="Center" 
               VerticalAlignment="Top" Height="70" Width="396"/>

        <Label Content="АВТОРИЗАЦИЯ" HorizontalAlignment="Center" 
               Margin="0,70,0,0" VerticalAlignment="Top" 
               FontFamily="Segoe UI Black" FontSize="24"/>

        <Button x:Name="btnAuth" Content="АВТОРИЗАЦИЯ" HorizontalAlignment="Center" Height="45" Margin="0,283,0,0" 
            VerticalAlignment="Top" Width="300" Background="#34c6cd" FontFamily="Segoe UI Black" 
            FontSize="16" BorderBrush="#00707070" Foreground="White" MouseEnter="btnAuth_MouseEnter" MouseLeave="btnAuth_MouseLeave"
            Style="{StaticResource NoHoverButton}" Click="btnAuth_Click"/>
        <TextBox Name="txtLogin" HorizontalAlignment="Center" Height="36" Margin="0,117,0,0" 
                 TextWrapping="Wrap" Text="" VerticalAlignment="Top" Width="300" 
                 Style="{StaticResource PlaceholderTextBoxStyle}" Tag="Введите логин"
                 VerticalContentAlignment="Center"  FontSize="16" />

        <Label Content="Введите пароль" HorizontalAlignment="Center" 
               Height="26" Margin="0,153,0,0" VerticalAlignment="Top" Width="124" FontSize="14"/>

        <PasswordBox x:Name="txtPassword" HorizontalAlignment="Center" Height="36" 
                 Password="" VerticalAlignment="Top" Width="300" Margin="0,181,0,0"
                 FontSize="16"    />
        <Button Name="btnShowPassword" Content="Показать пароль" 
                    HorizontalAlignment="Center" Margin="0,258,0,0" 
                VerticalAlignment="Top" RenderTransformOrigin="0.272,0.117" 
                Click="Button_Click" BorderBrush="Transparent"/>
        <Grid x:Name="gridPassword" HorizontalAlignment="Center" Height="29" 
              Margin="0,224,0,0" VerticalAlignment="Top" Width="300"/>

    </Grid>
</Window>
